<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/WEB-INF/jsp/common/taglib.jsp"%>
<link href="${ctxLigerUI}/skins/Aqua/css/ligerui-all.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="${ctxLigerUI}/js/plugins/ligerTree.js"></script>
<script type="text/javascript">
	var data = ${list};
	$(function() {
		var tree = $("#tree1").ligerTree({
			data : data,
			idFieldName : 'id',
			isexpand : true,
			slide : false,
			checkbox : false,
			isLeaf : function(data) {
				if (data.children == '') {
					return true;
				}
			},
			onClick : function(node) {
				if (node.data.children == '') {
					into(node.data.resurl, node.data.id);
				}
			},
			textFieldName : 'name',
			parentIDFieldName : 'parentid'
		});
		treeManager = $("#tree1").ligerGetTreeManager();
		treeManager.collapseAll();
		$("#activiti").click("click",function(){
			act();
		});
	});
	function into(url, id) {
		document.getElementById("content").src = "${ctx}\\" + url + "?id=" + id;
	}
	function autoHeight(){
		setIframeHeight("content");
	}
	function act(){
		window.location.href = "${ctx}/activiti/intoActivitiIndex.shtml";
	}
	
</script>
</head>
<body style="padding: 10px">
	<div style="width:1150px;height: 30px;border: 1px solid #ccc;margin-left: 10px; float: left;">
		<button id="activiti" style="margin: 4px; float: left;">activiti</button>
	</div>
	<div 
		style="width: 200px; height: 300px; margin: 10px; float: left; border: 1px solid #ccc; overflow: auto;">
		<ul id="tree1"></ul>
	</div>
	<iframe src="${ctx }/base/toPage.shtml?page=/welcome" id="content" frameborder=false scrolling="no" onLoad="setIframeHeight(this.id)" 
		style="width: 900px; height: 300px; margin-top: 10px; margin-left: 40px; float: left; border: 1px solid #ccc; overflow: auto;"></iframe>
</body>
</html>
